package edu.lagou.service;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

@FeignClient(name="lagou-service-code")
@RequestMapping("/api/code")
public interface AuthcodeFeignClient {

    @GetMapping("/create/{email}")
    public boolean createCode(@PathVariable(value="email") String email);

    @GetMapping("/validate/{email}/{code}")
    public String validateCode(@PathVariable("email") String email, @PathVariable("code") String code);
}
